From 7279452486b95bf157a75fda74744c7fd7b02e44 Mon Sep 17 00:00:00 2001 From: Gleb Popov <6yearold@gmail.com> Date: Mon, 24 Feb 2025 19:24:07 +0300 Subject: [PATCH] [PATCH] Fix a memory leak by actually freeing a correct pointer Gbp-Pq: Name upstream_8b4b5c86_Fix-a-memory-leak-by-actually-freeing-a-correct-pointer.patch --- src/plugins/sfdisk/sfdiskbackend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/sfdisk/sfdiskbackend.cpp b/src/plugins/sfdisk/sfdiskbackend.cpp index 3c4b900..e47c4e5 100644 --- a/src/plugins/sfdisk/sfdiskbackend.cpp +++ b/src/plugins/sfdisk/sfdiskbackend.cpp @@ -108,7 +108,7 @@ QList SfdiskBackend::scanDevices(const ScanFlags scanFlags) result.append(device); } } - + } VolumeManagerDevice::scanDevices(result); // scan all types of VolumeManagerDevices @@ -337,8 +337,8 @@ void SfdiskBackend::scanWholeDevicePartition(Device& d) { Partition *partition = scanPartition(d, partitionNode, firstSector, lastSector, QString(), false); if (partition->fileSystem().type() == FileSystem::Type::Unknown) { - setPartitionTableForDevice(d, nullptr); delete d.partitionTable(); + setPartitionTableForDevice(d, nullptr); } if (!partition->roles().has(PartitionRole::Luks)) -- 2.30.2